Product Code Database
Example Keywords: robots -call $44-159
barcode-scavenger
   » » Wiki: Gaussian Function
Tag Wiki 'Gaussian Function'.
Tag

In , a Gaussian function, often simply referred to as a Gaussian, is a function of the base form f(x) = \exp (-x^2) and with parametric extension f(x) = a \exp\left( -\frac{(x - b)^2}{2c^2} \right) for arbitrary constants , and non-zero . It is named after the mathematician Carl Friedrich Gauss. The graph of a Gaussian is a characteristic symmetric "bell curve" shape. The parameter is the height of the curve's peak, is the position of the center of the peak, and (the standard deviation, sometimes called the Gaussian RMS width) controls the width of the "bell".

Gaussian functions are often used to represent the probability density function of a normally distributed with and . In this case, the Gaussian is of the form

(2001). 9780521779401, Cambridge University Press. .

g(x) = \frac{1}{\sigma\sqrt{2\pi}} \exp\left( -\frac{1}{2} \frac{(x - \mu)^2}{\sigma^2} \right).

Gaussian functions are widely used in to describe the normal distributions, in signal processing to define , in where two-dimensional Gaussians are used for , and in mathematics to solve and diffusion equations and to define the Weierstrass transform. They are also abundantly used in quantum chemistry to form basis sets.


Properties
Gaussian functions arise by composing the exponential function with a quadratic function:f(x) = \exp(\alpha x^2 + \beta x + \gamma),where
  • \alpha = -1/2c^2,
  • \beta = b/c^2,
  • \gamma = \ln a-(b^2 / 2c^2).
(Note: a = 1/(\sigma\sqrt{2\pi}) in \ln a , not to be confused with \alpha = -1/2c^2)

The Gaussian functions are thus those functions whose is a concave quadratic function.

The parameter is related to the full width at half maximum (FWHM) of the peak according to

\text{FWHM} = 2 \sqrt{2 \ln 2}\,c \approx 2.35482\,c.

The function may then be expressed in terms of the FWHM, represented by : f(x) = a e^{-4 (\ln 2) (x - b)^2 / w^2}.

Alternatively, the parameter can be interpreted by saying that the two of the function occur at .

The full width at tenth of maximum (FWTM) for a Gaussian could be of interest and is \text{FWTM} = 2 \sqrt{2 \ln 10}\,c \approx 4.29193\,c.

Gaussian functions are analytic, and their limit as is 0 (for the above case of ).

Gaussian functions are among those functions that are elementary but lack elementary ; the of the Gaussian function is the :

\int e^{-x^2} \,dx = \frac{\sqrt\pi}{2} \operatorname{erf} x + C.

Nonetheless, their improper integrals over the whole real line can be evaluated exactly, using the Gaussian integral \int_{-\infty}^\infty e^{-x^2} \,dx = \sqrt{\pi}, and one obtains \int_{-\infty}^\infty a e^{-(x - b)^2 / (2c^2)} \,dx = ac \cdot \sqrt{2\pi}.

This integral is 1 if and only if a = \tfrac{1}{c\sqrt{2\pi}} (the normalizing constant), and in this case the Gaussian is the probability density function of a normally distributed with and : g(x) = \frac{1}{\sigma\sqrt{2\pi}} \exp\left(\frac{-(x - \mu)^2}{2\sigma^2} \right).

These Gaussians are plotted in the accompanying figure.

The product of two Gaussian functions is a Gaussian, and the of two Gaussian functions is also a Gaussian, with variance being the sum of the original variances: c^2 = c_1^2 + c_2^2. The product of two Gaussian probability density functions (PDFs), though, is not in general a Gaussian PDF.

The Fourier uncertainty principle becomes an equality if and only if (modulated) Gaussian functions are considered.

Taking the Fourier transform (unitary, angular-frequency convention) of a Gaussian function with parameters , and yields another Gaussian function, with parameters c, and 1/c. So in particular the Gaussian functions with and c = 1 are kept fixed by the Fourier transform (they are of the Fourier transform with eigenvalue 1).

A physical realization is that of the diffraction pattern: for example, a photographic slide whose has a Gaussian variation is also a Gaussian function.

The fact that the Gaussian function is an eigenfunction of the continuous Fourier transform allows us to derive the following interesting identity from the Poisson summation formula: \sum_{k\in\Z} \exp\left(-\pi \cdot \left(\frac{k}{c}\right)^2\right) = c \cdot \sum_{k\in\Z} \exp\left(-\pi \cdot (kc)^2\right).


Integral of a Gaussian function
The integral of an arbitrary Gaussian function is\int_{-\infty}^\infty a\,e^{-(x - b)^2/2c^2}\,dx = \ a \, |c| \, \sqrt{2\pi}.

An alternative form is\int_{-\infty}^\infty k\,e^{-f x^2 + g x + h}\,dx = \int_{-\infty}^\infty k\,e^{-f \big(x - g/(2f)\big)^2 + g^2/(4f) + h}\,dx = k\,\sqrt{\frac{\pi}{f}}\,\exp\left(\frac{g^2}{4f} + h\right), where f must be strictly positive for the integral to converge.


Relation to standard Gaussian integral
The integral \int_{-\infty}^\infty ae^{-(x - b)^2/2c^2}\,dx for some constants a, b and c > 0 can be calculated by putting it into the form of a Gaussian integral. First, the constant a can simply be factored out of the integral. Next, the variable of integration is changed from x to : a\int_{-\infty}^\infty e^{-y^2/2c^2}\,dy, and then to z = y/\sqrt{2 c^2}: a\sqrt{2 c^2} \int_{-\infty}^\infty e^{-z^2}\,dz.

Then, using the Gaussian integral identity \int_{-\infty}^\infty e^{-z^2}\,dz = \sqrt{\pi},

we have \int_{-\infty}^\infty ae^{-(x-b)^2/2c^2}\,dx = a\sqrt{2\pi c^2}.


Two-dimensional Gaussian function
Base form: f(x,y) = \exp(-x^2-y^2)

In two dimensions, the power to which e is raised in the Gaussian function is any negative-definite quadratic form. Consequently, the of the Gaussian will always be ellipses.

A particular example of a two-dimensional Gaussian function is

f(x,y) = A \exp\left(-\left(\frac{(x - x_0)^2}{2\sigma_X^2} + \frac{(y - y_0)^2}{2\sigma_Y^2} \right)\right).

Here the coefficient A is the amplitude, x0y0 is the center, and σ xσ y are the x and y spreads of the blob. The figure on the right was created using A = 1, x0 = 0, y0 = 0, σ x = σ y = 1.

The volume under the Gaussian function is given by V = \int_{-\infty}^\infty \int_{-\infty}^\infty f(x, y)\,dx \,dy = 2 \pi A \sigma_X \sigma_Y.

In general, a two-dimensional elliptical Gaussian function is expressed as f(x, y) = A \exp\Big(-\big(a(x - x_0)^2 + 2b(x - x_0)(y - y_0) + c(y - y_0)^2 \big)\Big), where the matrix \begin{bmatrix} a & b \\ b & c \end{bmatrix} is positive-definite.

Using this formulation, the figure on the right can be created using , , , .


Meaning of parameters for the general equation
For the general form of the equation the coefficient A is the height of the peak and is the center of the blob.

If we set \begin{align}

a &=  \frac{\cos^2\theta}{2\sigma_X^2} + \frac{\sin^2\theta}{2\sigma_Y^2}, \\
b &=  -\frac{\sin \theta \cos \theta}{2\sigma_X^2} + \frac{\sin \theta \cos \theta}{2\sigma_Y^2}, \\
c &=  \frac{\sin^2\theta}{2\sigma_X^2} + \frac{\cos^2\theta}{2\sigma_Y^2},
     
\end{align} then we rotate the blob by a positive, counter-clockwise angle \theta (for negative, clockwise rotation, invert the signs in the b coefficient).

To get back the coefficients \theta, \sigma_X and \sigma_Y from a, b and c use

\begin{align} \theta &= \frac{1}{2}\arctan\left(\frac{2b}{a-c}\right), \quad \theta \in -45,, \\ \sigma_X^2 &= \frac{1}{2 (a \cdot \cos^2\theta + 2 b \cdot \cos\theta\sin\theta + c \cdot \sin^2\theta)}, \\ \sigma_Y^2 &= \frac{1}{2 (a \cdot \sin^2\theta - 2 b \cdot \cos\theta\sin\theta + c \cdot \cos^2\theta)}. \end{align}

Example rotations of Gaussian blobs can be seen in the following examples:

Using the following code, one can easily see the effect of changing the parameters:

A = 1; x0 = 0; y0 = 0;

sigma_X = 1; sigma_Y = 2;

X, = meshgrid(-5:.1:5, -5:.1:5);

for theta = 0:pi/100:pi

   a = cos(theta)^2 / (2 * sigma_X^2) + sin(theta)^2 / (2 * sigma_Y^2);
   b = sin(2 * theta) / (4 * sigma_X^2) - sin(2 * theta) / (4 * sigma_Y^2);
   c = sin(theta)^2 / (2 * sigma_X^2) + cos(theta)^2 / (2 * sigma_Y^2);
     

   Z = A * exp(-(a * (X - x0).^2 + 2 * b * (X - x0) .* (Y - y0) + c * (Y - y0).^2));
     

   surf(X, Y, Z);
   shading interp;
   view(-36, 36)
   waitforbuttonpress
     
end

Such functions are often used in and in computational models of function—see the articles on and affine shape adaptation.

Also see multivariate normal distribution.


Higher-order Gaussian or super-Gaussian function or generalized Gaussian function
A more general formulation of a Gaussian function with a flat-top and Gaussian fall-off can be taken by raising the content of the exponent to a power P: f(x) = A \exp\left(-\left(\frac{(x - x_0)^2}{2\sigma_X^2}\right)^P\right).

This function is known as a super-Gaussian function and is often used for Gaussian beam formulation.Parent, A., M. Morin, and P. Lavigne. "Propagation of super-Gaussian field distributions". Optical and Quantum Electronics 24.9 (1992): S1071–S1079. This function may also be expressed in terms of the full width at half maximum (FWHM), represented by : f(x) = A \exp\left(-\ln 2\left(4\frac{(x - x_0)^2}{w^2}\right)^P\right).

In a two-dimensional formulation, a Gaussian function along x and y can be combined with potentially different P_X and P_Y to form a rectangular Gaussian distribution: f(x, y) = A \exp\left(-\left(\frac{(x - x_0)^2}{2\sigma_X^2}\right)^{P_X} - \left(\frac{(y - y_0)^2}{2\sigma_Y^2}\right)^{P_Y}\right). or an elliptical Gaussian distribution: f(x , y) = A \exp\left(-\left(\frac{(x - x_0)^2}{2\sigma_X^2} + \frac{(y - y_0)^2}{2\sigma_Y^2}\right)^P\right)


Multi-dimensional Gaussian function
In an n-dimensional space a Gaussian function can be defined as f(x) = \exp(-x^\mathsf{T} C x), where x = \begin{bmatrix} x_1 & \cdots & x_n\end{bmatrix} is a column of n coordinates, C is a positive-definite n \times n matrix, and {}^\mathsf{T} denotes .

The integral of this Gaussian function over the whole n-dimensional space is given as \int_{\R^n} \exp(-x^\mathsf{T} C x) \, dx = \sqrt{\frac{\pi^n}{\det C}}.

It can be easily calculated by diagonalizing the matrix C and changing the integration variables to the eigenvectors of C.

More generally a shifted Gaussian function is defined as f(x) = \exp(-x^\mathsf{T} C x + s^\mathsf{T} x), where s = \begin{bmatrix} s_1 & \cdots & s_n\end{bmatrix} is the shift vector and the matrix C can be assumed to be symmetric, C^\mathsf{T} = C, and positive-definite. The following integrals with this function can be calculated with the same technique: \int_{\R^n} e^{-x^\mathsf{T} C x + v^\mathsf{T}x} \, dx = \sqrt{\frac{\pi^n}{\det{C}}} \exp\left(\frac{1}{4} v^\mathsf{T} C^{-1} v\right) \equiv \mathcal{M}. \int_{\mathbb{R}^n} e^{- x^\mathsf{T} C x + v^\mathsf{T} x} (a^\mathsf{T} x) \, dx = (a^T u) \cdot \mathcal{M}, \text{ where } u = \frac{1}{2} C^{-1} v. \int_{\mathbb{R}^n} e^{- x^\mathsf{T} C x + v^\mathsf{T} x} (x^\mathsf{T} D x) \, dx = \left( u^\mathsf{T} D u + \frac{1}{2} \operatorname{tr} (D C^{-1}) \right) \cdot \mathcal{M}. \begin{align} & \int_{\mathbb{R}^n} e^{- x^\mathsf{T} C' x + s'^\mathsf{T} x} \left( -\frac{\partial}{\partial x} \Lambda \frac{\partial}{\partial x} \right) e^{-x^\mathsf{T} C x + s^\mathsf{T} x} \, dx \\ & \qquad = \left( 2 \operatorname{tr}(C' \Lambda C B^{- 1}) + 4 u^\mathsf{T} C' \Lambda C u - 2 u^\mathsf{T} (C' \Lambda s + C \Lambda s') + s'^\mathsf{T} \Lambda s \right) \cdot \mathcal{M}, \end{align} where u = \frac{1}{2} B^{- 1} v,\ v = s + s',\ B = C + C'.


Estimation of parameters
A number of fields such as stellar photometry, characterization, and emission/absorption line spectroscopy work with sampled Gaussian functions and need to accurately estimate the height, position, and width parameters of the function. There are three unknown parameters for a 1D Gaussian function ( a, b, c) and five for a 2D Gaussian function (A; x_0,y_0; \sigma_X,\sigma_Y).

The most common method for estimating the Gaussian parameters is to take the logarithm of the data and fit a parabola to the resulting data set. Hongwei Guo, "A simple algorithm for fitting a Gaussian function," IEEE Sign. Proc. Mag. 28(9): 134-137 (2011). While this provides a simple procedure, the resulting algorithm may be biased by excessively weighting small data values, which can produce large errors in the profile estimate. One can partially compensate for this problem through weighted least squares estimation, reducing the weight of small data values, but this too can be biased by allowing the tail of the Gaussian to dominate the fit. In order to remove the bias, one can instead use an iteratively reweighted least squares procedure, in which the weights are updated at each iteration. It is also possible to perform non-linear regression directly on the data, without involving the logarithmic data transformation; for more options, see probability distribution fitting.


Parameter precision
Once one has an algorithm for estimating the Gaussian function parameters, it is also important to know how precise those estimates are. Any estimation algorithm can provide numerical estimates for the variance of each parameter (i.e., the variance of the estimated height, position, and width of the function). One can also use Cramér–Rao bound theory to obtain an analytical expression for the lower bound on the parameter variances, given certain assumptions about the data. N. Hagen, M. Kupinski, and E. L. Dereniak, "Gaussian profile estimation in one dimension," Appl. Opt. 46:5374–5383 (2007) N. Hagen and E. L. Dereniak, "Gaussian profile estimation in two dimensions," Appl. Opt. 47:6842–6851 (2008)
  1. The noise in the measured profile is either i.i.d. Gaussian, or the noise is Poisson-distributed.
  2. The spacing between each sampling (i.e. the distance between pixels measuring the data) is uniform.
  3. The peak is "well-sampled", so that less than 10% of the area or volume under the peak (area if a 1D Gaussian, volume if a 2D Gaussian) lies outside the measurement region.
  4. The width of the peak is much larger than the distance between sample locations (i.e. the detector pixels must be at least 5 times smaller than the Gaussian FWHM).
When these assumptions are satisfied, the following covariance matrix K applies for the 1D profile parameters a, b, and c under i.i.d. Gaussian noise and under Poisson noise: \mathbf{K}_{\text{Gauss}} = \frac{\sigma^2}{\sqrt{\pi} \delta_X Q^2} \begin{pmatrix} \frac{3}{2c} &0 &\frac{-1}{a} \\ 0 &\frac{2c}{a^2} &0 \\ \frac{-1}{a} &0 &\frac{2c}{a^2} \end{pmatrix} \ , \qquad \mathbf{K}_\text{Poiss} = \frac{1}{\sqrt{2 \pi}} \begin{pmatrix} \frac{3a}{2c} &0 &-\frac{1}{2} \\ 0 &\frac{c}{a} &0 \\ -\frac{1}{2} &0 &\frac{c}{2a} \end{pmatrix} \ , where \delta_X is the width of the pixels used to sample the function, Q is the quantum efficiency of the detector, and \sigma indicates the standard deviation of the measurement noise. Thus, the individual variances for the parameters are, in the Gaussian noise case, \begin{align} \operatorname{var} (a) &= \frac{3 \sigma^2}{2 \sqrt{\pi} \, \delta_X Q^2 c} \\ \operatorname{var} (b) &= \frac{2 \sigma^2 c}{\delta_X \sqrt{\pi} \, Q^2 a^2} \\ \operatorname{var} (c) &= \frac{2 \sigma^2 c}{\delta_X \sqrt{\pi} \, Q^2 a^2} \end{align}

and in the Poisson noise case, \begin{align} \operatorname{var} (a) &= \frac{3a}{2 \sqrt{2 \pi} \, c} \\ \operatorname{var} (b) &= \frac{c}{\sqrt{2 \pi} \, a} \\ \operatorname{var} (c) &= \frac{c}{2 \sqrt{2 \pi} \, a}. \end{align}

For the 2D profile parameters giving the amplitude A, position (x_0,y_0), and width (\sigma_X,\sigma_Y) of the profile, the following covariance matrices apply:

\begin{align} \mathbf{K}_\text{Gauss} = \frac{\sigma^2}{\pi \delta_X \delta_Y Q^2} & \begin{pmatrix} \frac{2}{\sigma_X \sigma_Y} &0 &0 &\frac{-1}{A \sigma_Y} &\frac{-1}{A \sigma_X} \\

0 &\frac{2 \sigma_X}{A^2 \sigma_Y} &0 &0 &0 \\
0 &0 &\frac{2 \sigma_Y}{A^2 \sigma_X} &0 &0 \\
\frac{-1}{A \sigma_y} &0 &0 &\frac{2 \sigma_X}{A^2 \sigma_y} &0 \\
\frac{-1}{A \sigma_X} &0 &0 &0 &\frac{2 \sigma_Y}{A^2 \sigma_X}
     
\end{pmatrix} \\6pt \mathbf{K}_{\operatorname{Poisson}} = \frac{1}{2 \pi} & \begin{pmatrix}
\frac{3A}{\sigma_X \sigma_Y} &0 &0 &\frac{-1}{\sigma_Y} &\frac{-1}{\sigma_X} \\
0 & \frac{\sigma_X}{A \sigma_Y} &0 &0 &0 \\ 0 &0 &\frac{\sigma_Y}{A \sigma_X} &0 &0 \\
\frac{-1}{\sigma_Y} &0 &0 &\frac{2 \sigma_X}{3A \sigma_Y} &\frac{1}{3A} \\
\frac{-1}{\sigma_X} &0 &0 &\frac{1}{3A} &\frac{2 \sigma_Y}{3A \sigma_X}
\end{pmatrix}.
     
\end{align} where the individual parameter variances are given by the diagonal elements of the covariance matrix.


Discrete Gaussian
One may ask for a discrete analog to the Gaussian; this is necessary in discrete applications, particularly digital signal processing. A simple answer is to sample the continuous Gaussian, yielding the sampled Gaussian kernel. However, this discrete function does not have the discrete analogs of the properties of the continuous function, and can lead to undesired effects, as described in the article scale space implementation.

An alternative approach is to use the discrete Gaussian kernel: Lindeberg, T., "Scale-space for discrete signals," PAMI(12), No. 3, March 1990, pp. 234–254. T(n, t) = e^{-t} I_n(t) where I_n(t) denotes the modified Bessel functions of integer order.

This is the discrete analog of the continuous Gaussian in that it is the solution to the discrete diffusion equation (discrete space, continuous time), just as the continuous Gaussian is the solution to the continuous diffusion equation.Campbell, J, 2007, The SMM model as a boundary value problem using the discrete diffusion equation, Theor Popul Biol. 2007 Dec;72(4):539–46.


Applications
Gaussian functions appear in many contexts in the , the , , and . Some examples include:
  • In and probability theory, Gaussian functions appear as the density function of the normal distribution, which is a limiting probability distribution of complicated sums, according to the central limit theorem.
  • Gaussian functions are the Green's function for the (homogeneous and isotropic) diffusion equation (and to the , which is the same thing), a partial differential equation that describes the time evolution of a mass-density under . Specifically, if the mass-density at time t=0 is given by a , which essentially means that the mass is initially concentrated in a single point, then the mass-distribution at time t will be given by a Gaussian function, with the parameter a being linearly related to 1/ and c being linearly related to ; this time-varying Gaussian is described by the . More generally, if the initial mass-density is φ( x), then the mass-density at later times is obtained by taking the of φ with a Gaussian function. The convolution of a function with a Gaussian is also known as a Weierstrass transform.
  • A Gaussian function is the of the of the quantum harmonic oscillator.
  • The molecular orbitals used in computational chemistry can be linear combinations of Gaussian functions called (see also basis set (chemistry)).
  • Mathematically, the of the Gaussian function can be represented using Hermite functions. For unit variance, the n-th derivative of the Gaussian is the Gaussian function itself multiplied by the n-th Hermite polynomial, up to scale.
  • Consequently, Gaussian functions are also associated with the in quantum field theory.
  • are used in optical systems, microwave systems and lasers.
  • In representation, Gaussian functions are used as smoothing kernels for generating multi-scale representations in and . Specifically, derivatives of Gaussians (Hermite functions) are used as a basis for defining a large number of types of visual operations.
  • Gaussian functions are used to define some types of artificial neural networks.
  • In fluorescence microscopy a 2D Gaussian function is used to approximate the , describing the intensity distribution produced by a .
  • In signal processing they serve to define , such as in where 2D Gaussians are used for . In digital signal processing, one uses a discrete Gaussian kernel, which may be approximated by the Binomial coefficientHaddad, R.A. and Akansu, A.N., 1991, A Class of Fast Gaussian Binomial Filters for Speech and Image processing, IEEE Trans. on Signal Processing, 39-3: 723–727 or sampling a Gaussian.
  • In they have been used for understanding the variability between the patterns of a complex . They are used with kernel methods to cluster the patterns in the feature space.Honarkhah, M and Caers, J, 2010, Stochastic Simulation of Patterns Using Distance-Based Pattern Modeling, Mathematical Geosciences, 42: 487–517


See also
  • Bell-shaped function
  • Cauchy distribution
  • Normal distribution
  • Radial basis function kernel


Further reading


External links

Page 1 of 1
1
Page 1 of 1
1

Account

Social:
Pages:  ..   .. 
Items:  .. 

Navigation

General: Atom Feed Atom Feed  .. 
Help:  ..   .. 
Category:  ..   .. 
Media:  ..   .. 
Posts:  ..   ..   .. 

Statistics

Page:  .. 
Summary:  .. 
1 Tags
10/10 Page Rank
5 Page Refs
2s Time